package com.jinniulive.platform.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

import com.jinniulive.platform.bean.VideoListInfo;
import com.jinniulive.platform.module.video.ChildVideoFragment;

import java.util.List;

/**
 * Created by Administrater on 2016/12/8.
 */

public class VideoFragmentPagerAdapter extends FragmentStatePagerAdapter {
    List<ChildVideoFragment> mData;
    List<VideoListInfo.VideoDataBean.VtlstBean> mVtlst;
    public VideoFragmentPagerAdapter(FragmentManager fm, List<ChildVideoFragment> data,List<VideoListInfo.VideoDataBean.VtlstBean> vtlst) {
        super(fm);
        mData=data;
        mVtlst=vtlst;
    }

    @Override
    public Fragment getItem(int position) {
        return mData.get(position);
    }

    @Override
    public int getCount() {
        return mData.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return mVtlst.get(position).getTypedes();
    }
}
